<?php

class Blog_Plugin{

	function Blog_Plugin(){
		
	}

	function install($params){
            $script = new Cts_Db_Script("blog", "install");
            if (!$script) {
                    $params['errors'] = $script->errors;
            }
            return $params;
	}

	function uninstall($params){
            $script = new Cts_Db_Script("blog", "uninstall");
            if (!$script) {
                    $params['errors'] = $script->errors;
            }
            return $params;
	}

	function enable($params){

		return $params;
	}

	function disable($params){

		return $params;
	}

	function addNav($params){
		Cts_Log::info("Adding blog nav data to admin nav");
		//Cts_Log::debug(var_export($params['nav_items']['admin'],true));
		
		 $params['nav_items']['admin']['children'][] = array (
  			'id' => 'blog',
  			'parent_id' => '7',
  			'role_id' => '3',
  			'module' => NULL,
  			'group' => NULL,
  			'short_name' => 'blog_admin',
  			'link_text' => 'Blog',
  			'url' => '/blog/admin',
  			'sort_order' => '9999',
			);	
			 
		return $params;
	}

}